<%@ Page language="c#" Codebehind="UploadPreview.aspx.cs" AutoEventWireup="True" Inherits="CrossFactory.SiteNote.XmlEditor.UploadPreview" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>
			<%= pageResourceManager.GetString("pagetitle")%>
		</title>
		<LINK href="StyleSheets/XmlEditor.css" type="text/css" rel="stylesheet">
			<script language="javascript">
			var imgInitialWidth;
			var imgInitialHeight;
			
			function Loaded()
			{
				window.focus();
				document.all["image"].src = dialogArguments;
			}
			
			function Img_Resize()
			{
				var obj;
				var infosDimensions;
				var infosSize;
				
				obj = window.event.srcElement;
				
				while(obj.tagName != 'IMG')
				{
					obj = obj.parentElement;
				}
				
				imgInitialWidth = obj.width;
				imgInitialHeight = obj.height;
				
				if(obj.width > 350 || obj.height > 300)
				{
					if(obj.width > obj.height)
					{
						obj.width = 350;
					}
					else
					{
						obj.height = 300;
					}			
				}
				
				infosDimensions = "Dimensions : " + imgInitialWidth + "  x  " + imgInitialHeight + " pixels";
				infosSize = "Size : " + (obj.fileSize / 1024).toFixed(1) + " Kb";
				window.document.all["imgInfosDimensions"].innerText = infosDimensions;
				window.document.all["imgInfosSize"].innerText = infosSize;
				
			}
			
			
			</script>
	</HEAD>
	<body MS_POSITIONING="FlowLayout" bottommargin="0" leftmargin="0" rightmargin="0" topmargin="0" onload="Loaded()">
		<form id="UploadPreview" method="post" runat="server">
			<table id="Main" cellSpacing="0" cellPadding="0" border="0" style="WIDTH:100%;HEIGHT:100%">
				<tr height="31">
					<td colspan="5">
						<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
							<tr>
								<td width="100%">
									<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
										<tr>
											<td width="100%" background="Images/HeaderLeft.gif"><img src="Images/Transp.gif" height="1" width="100%"></td>
											<td align="right"><img src="Images/HeaderRight.gif"></td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td width="7" background="Images/BackgroundLeft.gif"><img src="Images/Transp.gif" width="7"></td>
					<td width="7"><img src="Images/Transp.gif" width="7"></td>
					<td>
						<table>
							<tr>
								<td id="imgInfosDimensions" width="100%" height="100%" class="label" valign="center" align="left"></td>
							</tr>
							<tr>
								<td id="imgInfosSize" width="100%" height="100%" class="label" valign="center" align="left"></td>
							</tr>
						</table>
					</td>
					<td width="7"><img src="Images/Transp.gif" width="7"></td>
					<td width="9" height="100%">
						<table border="0" cellpadding="0" cellspacing="0" width="9" height="100%">
							<tr height="32">
								<td width="9"><img src="Images/BackgroundTopRight.gif"></td>
							</tr>
							<tr height="100%">
								<td width="9" background="Images/BackgroundRight.gif"></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td width="7" background="Images/BackgroundLeft.gif"><img src="Images/Transp.gif" width="7"></td>
					<td width="7"><img src="Images/Transp.gif" width="7"></td>
					<td id="content" width="100%" height="100%" class="label" valign="center" align="middle">
						<div style="OVERFLOW:auto;WIDTH:350px;HEIGHT:300px">
							<img id="image" onload="Img_Resize();" src="" alt="If this image is not visible : add this website in 'Trusted sites'
(Tools/Internet Options/Security)" title="">
						</div>
					</td>
					<td width="7"><img src="Images/Transp.gif" width="7"></td>
					<td width="9" height="100%">
						<table border="0" cellpadding="0" cellspacing="0" width="9" height="100%">
							<tr height="32">
								<td width="9"><img src="Images/BackgroundTopRight.gif"></td>
							</tr>
							<tr height="100%">
								<td width="9" background="Images/BackgroundRight.gif"></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr height="40">
					<td colspan="5">
						<table border="0" cellpadding="0" cellspacing="0" height="100%">
							<tr>
								<td height="8"><img src="Images/FooterLeft.gif"></td>
								<td width="100%">
									<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
										<tr>
											<td width="100%" background="Images/FooterCenter.gif" height="8"></td>
											<td height="8"><img src="Images/FooterRight.gif" width="255" height="8"></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td align="right" width="100%" colSpan="3">
									<table id="Table5" width="100%" height="100%" border="0" style="BACKGROUND :url(Images/Footer.gif) no-repeat right 50%">
										<tr>
											<td width="100%"></td>
											<td><input id="Close" type="button" value='<%= pageResourceManager.GetString("closeButton")%>' name="Close" onclick="window.close();"></td>
											<td width="1"></td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</body>
</HTML>
